package com.shop.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;

import com.shop.po.User;
import com.shop.po.UserExample;

public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer uid);

    // 通过用户名查询用户
 	User selectByUsername(String username);

 	// 通过用户名和密保问题查询用户
 	User selectByUsernameAndQuestion(@Param("username") String username, @Param("question") String question);

 	// 修改密码
 	int updatePsw(@Param("username") String username, @Param("password") String password);

 	List<User> selectByUname(String username);
 	
    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    List<User> selectByPrimaryKey(Integer uid);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
}